﻿@model RankViewModel
           
<script language="javascript" type="text/javascript">
    function togglePostCount() {
        if ($("input._rolerank:checked").val() == 'True')
            $("._postcount").hide();
        else
            $("._postcount").show();
    }
    $(document).ready(function () {
        togglePostCount();
        $("input._rolerank").click(function () {
            togglePostCount();
        });
    }); 
</script>


<dl>
    <dt>Title</dt>
    <dd>
        @Html.TextBoxFor(model => model.Title)
        @Html.ValidationMessageFor(model => model.Title)
    </dd>
                
    <dt>Is a role rank</dt>
    <dd>
        @Html.RadioButtonFor(model => model.IsRoleRank, true, new { @class="_rolerank", id="IsRoleRankTrue" })  
        <label for="IsRoleRankTrue" class="inline">Yes</label>
                
        @Html.RadioButtonFor(model => model.IsRoleRank, false, new { @class = "_rolerank", id = "IsRoleRankFalse" })  
        <label for="IsRoleRankFalse" class="inline">No</label>
    </dd>
                
    <dt class="_postcount">Post Count</dt>
    <dd class="_postcount">
        @Html.TextBoxFor(model => model.PostCount)
        @Html.ValidationMessageFor(model => model.PostCount)
    </dd>
                
    <dt>Image</dt>
    <dd>
        @Html.TextBoxFor(model => model.Image)
        @Html.ValidationMessageFor(model => model.Image)
    </dd>

    <dt>Title Color</dt>
    <dd>
        @Html.TextBoxFor(model => model.Color) 
        <label id="colorPickerPreview" class="inline" style='font-size: 12.5px;font-weight: bold;'>Color Preview</label>
        @Html.ValidationMessageFor(model => model.Color)
    </dd>
                                                                              
    <dt>&nbsp;</dt>
    <dd>
        <input type="submit" value="@Html.SubmitButtonText(Model.RankID)" />
    </dd>
</dl>